New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scaffe

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scaffe

A Scaffolding Utility

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

scaffe.js

Simple scaffolding utility, inspired by Sao.js

Installation

$ npm install scaffe --save

Programmatic Usage

const scaffe = require("scaffe")

...

scaffe.generate(template_dir, outDir, { name: appName }, (err) => {
  if(err){
    console.error(err)
  } else {
    console.log("Successfully generated")
  }
})

The only available function in Scaffe is generate which takes arguments as following in order.

templateDir: It's the path to the template directory.
outDir: The output directory
values: An Object mapped from variables to it's values
cb: A callback function that have err as the only argument

Template directory can have two types files
starts with _: this file will be evaluated as an ejs file
doesn't starts with _: this type of files will be copied as it is to the output directory.

So we can uses variables in our template files in ejs format.

A use case,

// _package.json

{
  "name": "<%= appName %>"
}

values i.e. 3rd argument; will contain all variable values that needs to be passed on to pe processed by ejs.

Keywords

FAQs

Package last updated on 25 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc